package org.eiahe.hr.salary.domain.bo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.ehe.common.core.validate.AddGroup;
import org.ehe.common.core.validate.EditGroup;
import org.ehe.common.core.xss.Xss;
import org.ehe.common.mybatis.core.domain.BaseEntity;
import org.eiahe.hr.salary.domain.SalaryStatistics;

import java.math.BigDecimal;

/**
 * 薪资统计业务对象 hr_salary_statistics
 *
 * @author zhangnn
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = SalaryStatistics.class, reverseConvertGenerate = false)
public class SalaryStatisticsBo extends BaseEntity {

    /**
     * 统计ID
     */
    @NotNull(message = "统计ID不能为空", groups = { EditGroup.class })
    private Long statisticsId;

    /**
     * 租户ID
     */
    private String tenantId;

    /**
     * 统计年月(yyyyMM格式)
     */
    @NotBlank(message = "统计年月不能为空", groups = { AddGroup.class, EditGroup.class })
    private String yearMonth;

    /**
     * 部门
     */
    private String department;

    /**
     * 员工总数
     */
    private Integer employeeCount;

    /**
     * 应发工资总额
     */
    private BigDecimal grossSalaryTotal;

    /**
     * 实发工资总额
     */
    private BigDecimal netSalaryTotal;

    /**
     * 平均应发工资
     */
    private BigDecimal avgGrossSalary;

    /**
     * 平均实发工资
     */
    private BigDecimal avgNetSalary;

    /**
     * 最高应发工资
     */
    private BigDecimal maxGrossSalary;

    /**
     * 最低应发工资
     */
    private BigDecimal minGrossSalary;

    /**
     * 社保个人扣款总额
     */
    private BigDecimal socialInsurancePersonalTotal;

    /**
     * 公积金个人扣款总额
     */
    private BigDecimal housingFundPersonalTotal;

    /**
     * 个人所得税总额
     */
    private BigDecimal personalTaxTotal;

    /**
     * 状态(0正常 1封存)
     */
    private String status;

    /**
     * 备注
     */
    @Xss(message = "备注不能包含脚本字符")
    private String remark;
}